package com.zunkye.consumer.service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.zunkye.service.UserService;
import com.zunkye.domain.User;
import org.springframework.stereotype.Component;
import com.zunkye.resp.ProcessResp;

import java.util.List;

@Component
public class UserConsumerService {
    @Reference
    private UserService userService;

    public ProcessResp addUser(User user){
        return userService.addUser(user);
    }

    public User getUser(Long id){
        return userService.getUser(id);
    }

    public List<User> getUsers(){
        return userService.getUsers();
    }

    public ProcessResp removeUser(Long id){
        return userService.removeUser(id);
    }
}
